<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="jquery.js"></script>
</head>
<body>
	<ul>
		<li><a href="#find">发现</a></li>
		<li><a href="#friend">朋友</a></li>
		<li><a href="#mine">我的</a></li>
	</ul>
	<div class="box"></div>
	<script>
		$(function(){
			$(window).on("hashchange",function(){
				// console.log(location.hash);
				var hash=location.hash;
				switch(hash){
					case "#find":
					$.get('find.json',function(data){
						$('.box').html(data.data);
					});
					break;
					case "#friend":
					$.get('friend.json',function(data){
						$('.box').html(data.data);
					});
					break;
					case "#mine":
					$.get('mine.json',function(data){
						$('.box').html(data.data);
					});
					break;
				};
			});
		});
	</script>
</body>
</html>
